class Solution {
public:
    vector<int> runningSum(vector<int>& nums) {
        int length = nums.size();
        vector<int> sums(length);
        for (int i = 0; i < length; i++) {
            for (int j = 0; j <= i; j++) {
                sums[i] += nums[j];
            }
        }
        return sums;
    }
};
